package com.erlin.store.controller.vo;

import com.erlin.store.controller.param.StoreRegisterParam;
import com.erlin.store.entity.Store;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@Getter
@Setter
public class StoreInfoVo extends StoreRegisterParam implements Serializable {
    @ApiModelProperty("商店状态 0未开通 1打烊 2营业中 3忙碌 -1已被强制关闭")
    private Integer storeStatus;
    @ApiModelProperty("商店状态 0未提交 1审核中 2审核通过 -1审核不通过")
    private Integer authStatus;
    @ApiModelProperty("审核失败原因")
    private String auditFailedReason;
    @ApiModelProperty("mid")
    private String mid;

    public static StoreInfoVo from(Store source) {
        StoreInfoVo storeInfoVo = new StoreInfoVo();
        BeanUtils.copyProperties(source,storeInfoVo);
        return storeInfoVo;
    }
}
